Touch sensitive devices allow a user to conveniently interface with electronic systems and displays by reducing or eliminating the need for mechanical buttons, keypads, keyboards, and pointing devices. For example, a user can carry out a complicated sequence of instructions by simply touching an on-display touch screen at a location identified by an icon. In many touch sensitive devices, the input is sensed when a conductive object in the sensor is capacitively coupled to a conductive touch implement such as a user's finger.
In some cases, a touch from a user's finger or other touch implement or object changes an unknown capacitance Cx on a touch plate or other touch device such as a button, switch, linear slider, or the like. By measuring the unknown capacitance Cx, one can determine the presence and location (if applicable) of the touch.
FIG. 1, which is taken from U.S. Patent Application Publication US 2008/0142281 (Geaghan), shows one embodiment of a circuit 140 for measuring the unknown capacitance Cx on a touch plate (not shown). Circuit 140 can take advantage of the parallel input/output (PIO) ports found on low cost, readily available IC chips, making the circuit 140 easy to fabricate and very cost effective. Switches S15 and S16, and comparator A1, can be provided as components within a first PIO port. Similarly, switches S17 and S18, and comparator A2, can be the components within a second PIO port. Both PIO ports can be provided on a single IC chip. Dashed box 142 contains the portions of circuit 140 that are readily available on commercial IC chips (for example, the chips available from Silicon Laboratories under the trade designation C8051F320), with the remaining circuit components being external to the IC chip. Signal accumulators C11 and C12 are shown in FIG. 1 as capacitors external to the PIO ports. C11 and C12 are preferably of nominally equal value so that signal accumulation under both charging and discharging cycles occurs under roughly similar conditions. Resistor R1 is a resistor external to the PIO ports that is used to limit the charge and discharge currents to and from the touch plate as well as any electrostatic discharge (ESD) spikes. Resistor R1 may be integrated into the sensing device that includes the plate. Resistor R2 is another resistor external to the PIO ports that can be used to provide a DC bias voltage Vb to the node N2, for example ground or another voltage as described in more detail in the '281 Geaghan publication. Cx is the plate capacitance to be measured, for example the capacitance to ground from an electrode or conductive layer in a touch sensor.
In this discussion, the threshold voltage (Vth) of comparators A1 and A2 is assumed to be about equal to Vcc/2, which is typical of low cost switching circuits, even though the circuit can operate with other thresholds. The thresholds for comparators A1 and A2 are preferably equal and of a magnitude such that the number of charging and discharging cycles required to reach the threshold provide a sufficient signal-to-noise ratio.
Measurement of Cx is performed by transferring charge to and from Cx alternately through C11 and C12. The charge transfer cycles can take place in an interlaced fashion. Table 1 below indicates an exemplary ordering of charging and discharging cycles, referred to as “Sequence A”. In reference to Table 1, Step 1 resets C11 and C12 to 0 V across the series combination of the two capacitors by closing S16 and S18. In Step 2, S15 is closed and C11 and Cx are charged by a positive-going pulse (i.e., current is flowing into the plate). In Step 3, the voltage V6 is sampled to see if the voltage V3 is above the switching threshold of A2. In Step 4, S18 is closed and the charge on Cx is discharged onto C12. When C11 is transferring charge, C12 is floating (S17 and S18 are open). When charge is transferred through C12, C11 is floating. In Step 5, V5 is sampled to determine if V1 is above the switching threshold of A1. Step 2 through Step 5 can be repeated, charging C11 and Cx again, then discharging Cx through C12. Step 2 through Step 5 can be repeated until the combined voltages on C11 and C12 are charged to the threshold switching point, Vth, of comparator A1 or A2. At that point, the comparator A1 output (previously low during testing) will be high during the test period of Step 5. After a few more cycles, the comparator A2 state (normally high during testing) will also be low during Step 3. The number of charge-discharge pulses required to charge C11 and C12 to this point is approximately inversely proportional to the magnitude of Cx. FIG. 2 schematically depicts the various voltage levels during a Sequence A series of charging and discharging cycles.
TABLE 1Sequence ACompo-Step 1Step 2Step 3Step 4Step 5nentReset 1ChargeTest A2DischargeTest A1S15openclosedclosedopenopenS16closedopenopenopenopenS17openopenopenopenopenS18closedopenopenclosedclosedV10 VVccVccsee FIG. 2test if >VthV2see FIG. 2see FIG. 2see FIG. 2see FIG. 2see FIG. 2V30 Vsee FIG. 2see FIG. 20 V0 VV5lowhighhigh?test for highV6low?test for lowlowlow
Step 6 is to determine Cx. Sequence A loops through Steps 2, 3, 4, and 5 until V5 goes “high”. When “high” is detected in Step 5, the number of cycles of Steps 2, 3, 4 and 5 indicates the ratio of Cx to C11 and C12, which in turn can be used to determine the magnitude of Cx. V6 will go “low” shortly after V5 goes high (typically one or a few cycles if C11 and C12 are equal). The number of cycles before the V6 low transition to “low” can also be used, alternatively or in combination (e.g. averaged), with the V5 high transition to calculate the value of Cx.
Because C11 and C12 may not be perfectly equal, it can be desirable to reverse the process of Sequence A, making the previous charging path into the new discharging path, and the previous discharging path into the new charging path. This reversed sequence, referred to as “Sequence B”, is set forth in Table 2. Performing charge/discharge cycles according to Sequence B occurs much like performing charge/discharge cycles under Sequence A. Establishing such mutually reversed sequences that alternate the charge/discharge cycle pathways helps to compensate for differences in magnitude between the components in those pathways, particularly the magnitudes of C11 and C12, through the cycling of residual charge onto the smaller of C11 or C12 after a reset step. While performing such a sequence reversal can be beneficial, it is not required. FIG. 2 schematically depicts the various voltage levels during a Sequence B series of charging and discharging cycles.
TABLE 2Sequence BCompo-Step 7Step 8Step 9Step 10Step 11nentReset 7ChargeTest A1DischargeTest A2S15openopenopenopenopenS16closedopenopenclosedclosedS17openclosedclosedopenopenS18closedopenopenopenopenV10 Vsee FIG. 2see FIG. 20 V0 VV2see FIG. 2see FIG. 2see FIG. 2see FIG. 2see FIG. 2V30 VVccVccsee FIG. 2see FIG. 2V5low?test for lowlowlowV6lowhighhigh?test for high
Step 12 is to determine Cx. Sequence B loops through Steps 8, 9, 10, and 11 until V6 reaches its “high” state. When V6 “high” is detected in Step 11, the number of cycles of Steps 8, 9, 10, and 11 performed to that point can be used to determine the magnitude of Cx. V5 will go “low” shortly after V6 goes high. The number of cycles before the V5 transition to “low” can also be used, alternatively or in combination (e.g. averaged), with the V6 high transition to calculate the value of Cx.
Optionally, the results of determining Cx in Steps 6 and 12 can be averaged to yield a final result for Cx. The results of performing multiple A sequences and B sequences may be averaged to yield a better filtered final result for Cx.